package com.owc.domain.vo.admin;

import com.owc.common.converter.Initialization;
import com.owc.common.converter.InputConverter;
import com.owc.domain.entity.Banner;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @Author xiaom
 * @Date 2020/3/2 15:52
 * @Version 1.0.0
 * @Description <>
 **/
@Data
@ApiModel("banner入参")
public class BannerVo implements Serializable, InputConverter<Banner> {

    @ApiModelProperty("banner名称")
    private String name;

    @ApiModelProperty("图片地址")
    @NotNull(message = "图片地址不能为空")
    private String picUrl;

    @ApiModelProperty("跳转链接")
    private String jumpUrl;

    @ApiModelProperty("状态  -1(下架) 5(上架)")
    @NotNull(message = "请选择状态")
    private Integer status;

    @ApiModelProperty("排序")
    @NotNull(message = "排序状态")
    private Integer order;

    @ApiModelProperty("主键ID")
    private Long id;

    @Override
    public void customConverter(Banner banner) throws Exception {
        initBasisData(banner);
    }
}
